<template>
	<view class="app">
		<view class="back-btn" :style="{top: '100rpx'}" @tap="$xyfun.back()">
			<image src="/static/arrow-left.png" mode="aspectFit"></image>
		</view>
		<!-- #ifndef H5 -->
		<!-- <view class="back-btn" :style="{top:$xyfun.xysys().top+'px'}" @tap="$xyfun.back()">
			<image src="/static/arrow-left.png" mode="aspectFit"></image>
		</view> -->
		<!-- #endif -->
		<view class="banner">
			<!-- <image src="https://cdn.deletennis.com/join3/myf_test.gif" mode="widthFix"></image> -->
			<image src="https://hniuniu-oss.oss-cn-hangzhou.aliyuncs.com//upload/82/20250116/d8bce61c72c8521ed515a24474eaf3d3.gif" mode="widthFix"></image>
		</view>
		<view class="content-box">
			<view class="content-title">
				<image class="content-title-image" :src="$xyfun.image('/static/beijing.png')" mode="widthFix"></image>
				<view class="content-subtitle">
					<text>配置参数</text>
					<image class="content-subtitle-arrow" src="/static/arrow-white.png" mode="aspectFit"></image>
				</view>
			</view>

			<view class="bottom-section">
				<view class="bottom-section-tips">
					<view>即刻加盟 享限时入驻权限</view>
					<image class="bottom-section-arrow" src="/static/arrow-left.png" mode="aspectFit"></image>
				</view>
				<view class="button-group">
					<button class="btn btn-outline" @tap="learnMore">预约体验</button>
					<button class="btn btn-outline" @tap="toProduct">即刻加盟</button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bottomTop: '600px'
			}
		},
		onLoad() {
			const sysInfo = this.$xyfun.xysys()
			// 计算底部区域的位置，保持底部部分在下面
			const bottomHeight = this.$xyfun.rpxToPx(430) // bottom-section 高度（px）
			const contentTop = this.$xyfun.rpxToPx(276) // content-box 的 top 值（px）
			const screenHeightpx = sysInfo.screenHeight
			let marginTop = screenHeightpx - contentTop - bottomHeight - contentTop / 2

			this.bottomTop = marginTop + 'px'
		},
		methods: {
			learnMore() {
				// 预约体验按钮点击事件
				console.log('预约体验')
				uni.navigateTo({
					url: "/pages/store/venue"
				})
			},
			toProduct() {
				// $xyfun.to('/pages/joinUs/product')
				uni.navigateTo({
					url: "/pages/joinUS/product"
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.back-btn {
		position: fixed;
		left: 16rpx;
		z-index: 100;
		width: 54rpx;
		height: 54rpx;
	}

	.back-btn image {
		width: 54rpx;
		height: 54rpx;
	}

	.app {
		position: relative;
		width: 100%;
	}

	.banner {
		width: 100%;
		height: 883rpx;
	}

	.banner image {
		width: 100%;
		height: 910.8rpx;
		object-fit: cover;
	}



	.content-box {
		position: absolute;
		top: 276rpx;
		width: 100%;
	}

	.content-title {
		color: #fff;
		font-weight: 700;
		margin-left: 76rpx;

		.content-title-image {
			width: 474rpx;
			height: 54rpx;
			display: block;
			margin-bottom: 30rpx;
			text-align: left;
		}
	}

	.content-subtitle {
		box-sizing: border-box;
		display: flex;
		align-items: center;
		background-color: rgba(0, 0, 0, 0.5);
		border-radius: 8rpx;
		font-size: 26rpx;
		margin-top: 30rpx;
		padding: 6rpx 12rpx;
		width: 154rpx;

		text {
			color: #fff;
		}

		.content-subtitle-arrow {
			height: 20rpx;
			width: 20rpx;
			margin-top: 4rpx;
			padding-left: 6rpx;
		}
	}


	.bottom-section {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		background: linear-gradient(rgba(71, 71, 71, 0.1), rgba(99, 99, 99, 0.6), rgba(4, 4, 4, 0.6), rgba(0, 0, 0, 0.9));
		color: #fff;
		height: 430rpx;
		margin-top: 630rpx;
		width: 100%;

		.bottom-section-tips {
			text-align: center;
		}

		.bottom-section-arrow {
			color: #fff;
		}
	}

	.bottom-section image {
		height: 54rpx;
		margin-top: 26rpx;
		transform: rotate(90deg);
		width: 54rpx;
	}

	.button-group {
		display: flex;
		justify-content: space-between;
		margin: 38rpx 10rpx 0;
		padding: 0 32rpx;
		width: 100%;

		button {
			display: flex;
			align-items: center;
			justify-content: center;
			width: 354rpx;
			height: 114rpx;
			border-radius: 10rpx;
			font-size: 36rpx;
			color: #fff;
		}



		.btn-outline {
			background-color: rgba(0, 0, 0, 0.1);
			border: 2rpx solid #fff;
		}
	}
</style>